home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
sound
/
mtlabsnd.zip
/
PLAY.M
< prev
next >
Wrap
Text File
|
1993-04-26
|
609b
|
25 lines
function play(filename)
% play(filename)
%
% filename = valid dos filename of a .WAV file, without extension
%
% Plays a Windows .WAV file through the system speakers. Prompts
% for input as to whether the user wants the sound played again.
%
if (nargin ~= 1)
error('PLAY: number of input arguments must be one.');
end;
if (nargout ~= 0)
error('PLAY: number of output arguments must be zero.');
end;
eval(['!playw ' filename '.wav']);
while ~isempty(input('Enter 1 to play again, <RETURN> to continue... '))
eval(['!playw ' filename '.wav']);
end